import React, { useEffect } from 'react'
import { StatusBar, StyleSheet, Text, View,Image}  from 'react-native';
import { Ionicons } from '@expo/vector-icons';


const Detail = ({navigation,route}) => {
    // console.log(route.params.userName)
    const {userName} = route.params
    useEffect(()=>{  
        navigation.setOptions({
            haerderTitle:()=>(
                <Image
                    source={require('../../assets/favicon.png')}
            />//headerTitle后面可与跟一个组件
            ),
            headerLeft:()=>(
                <Ionicons 
                    onPress={navigation.goBack} 
                    name="chevron-back" 
                    size={30} 
                    color="#fff" 
                />
            ),
            headerRight:()=>(
                <Image
                     source={require('../../assets/favicon.png')}
                />
            )
        })     
    },[])

    
  return (
    <View><Text>详情</Text></View>
   
  )
}

export default Detail